libxl: handle errors from xc_sharing_* info functions
authorIan Campbell <Ian.Campbell@citrix.com>
Fri, 14 Sep 2012 09:02:46 +0000 (10:02 +0100)
committerIan Campbell <Ian.Campbell@citrix.com>
Fri, 14 Sep 2012 09:02:46 +0000 (10:02 +0100)
commit393a6e75afb627fe126bfc8050bd53b9e086e1dc
tree9fb6303305616ad39cdbdbfb2ff793671a8e9efe
parenta050ca848bd7025f5a81388aea358c28e0921f4a
libxl: handle errors from xc_sharing_* info functions

On a 32 bit hypervisor xl info currently reports:
sharing_freed_memory   : 72057594037927935
sharing_used_memory    : 72057594037927935

Eat the ENOSYS and turn it into 0. Log and propagate other errors.

I don't have a 32 bit system handy, so tested on x86_64 with a libxc
hacked to return -ENOSYS and -EINVAL.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl.c